package com.quiz.source;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.media.MediaPlayer;
import android.os.Bundle;

@SuppressWarnings("unused")
public class myMain extends Activity {
	
	
    /** Called when the activity is first created. */
	MediaPlayer mpSplash;
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.screen);
        
        mpSplash = MediaPlayer.create(this, R.raw.quiz_theme);
        
        mpSplash.start();
        
        Thread logoTimer = new Thread(){
        	
        	public void run()
        	{
        		try
        		{
        			int logoTimer = 0;
        			
        			while ( logoTimer < 4000)
        			{
        				sleep(100);
        				logoTimer = logoTimer + 100;
        			}
        			//SavePreferences("count",0);
  				    //LoadPreferences();
        			startActivity(new Intent("com.quiz.source.CLEARSCREEN"));
        			
        		} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
        		
        		finally
        		{
        			finish();
        		}
        	}
        };
        logoTimer.start();
    }
	/*private void SavePreferences(String key, int i){
	    SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
	    SharedPreferences.Editor editor = sharedPreferences.edit();
	    editor.putLong(key, i);
	    editor.commit();
	   }
	  
	   private void LoadPreferences(){
	    SharedPreferences sharedPreferences = getPreferences(MODE_PRIVATE);
	    String strSavedMem1 = sharedPreferences.getString("count", "");
	    String strSavedMem2 = sharedPreferences.getString("MEM2", "");
	   // textSavedMem1.setText(strSavedMem1);
	    //textSavedMem2.setText(strSavedMem2);
	   }*/
}